/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 通用样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4e5ba6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3a468f;
}

.btn.primary {
    background-color: #28a745;
}

.btn.primary:hover {
    background-color: #218838;
}

.btn.secondary {
    background-color: #6c757d;
}

.btn.secondary:hover {
    background-color: #5a6268;
}

.btn.danger {
    background-color: #dc3545;
}

.btn.danger:hover {
    background-color: #c82333;
}

.btn.small {
    padding: 4px 8px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.required {
    color: #dc3545;
}

.error-message {
    color: #dc3545;
    padding: 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 24px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li.active a,
nav ul li a:hover {
    color: #1abc9c;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    color: #1abc9c;
}

/* 主内容区样式 */
main {
    padding: 30px 0;
    min-height: calc(100vh - 160px);
}

.content-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.content-header h2 {
    font-size: 22px;
    color: #2c3e50;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #2c3e50;
}

/* 仪表盘样式 */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 12px;
}

.stat-card p {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.quick-actions {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-actions h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

table tr:hover {
    background-color: #f8f9fa;
}

.actions {
    display: flex;
    gap: 8px;
}

.no-data {
    text-align: center;
    color: #6c757d;
    padding: 40px 0;
}

/* 搜索表单 */
.search-form {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* 详情页面样式 */
.detail-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.detail-header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
}

.detail-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.detail-body {
    padding: 20px;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-item {
    flex: 1;
    min-width: 250px;
    margin-bottom: 12px;
}

.detail-item .label {
    display: inline-block;
    width: 120px;
    font-weight: 500;
    color: #6c757d;
}

.detail-item .value {
    color: #2c3e50;
}

/* 表单容器 */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}